-- GENERATED SPELL FOR [Ashkaz] --


function spell0_18539(pUnit, Event) --@Arakkoa Blast,n/a--
pUnit:FullCastSpellOnTarget(32907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18539', 608, 1)
end

function spell1_18539(pUnit, Event) --@Enveloping Winds,n/a--
pUnit:FullCastSpellOnTarget(6728,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18539', 12000, 1)
end

function spell2_18539(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(26098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18539', 3000, 1)
end

function spell3_18539(pUnit, Event) --@Power of Kran\'aish,n/a--
pUnit:FullCastSpellOnTarget(32924,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18539', 0, 1)
end

function Sorts_18539(pUnit, Event)
local choix_sorts_18539 = math.random(0, 3)
if choix_sorts_18539 == 0 then
pUnit:RegisterEvent('spell0_18539', 1, 1)
end
if choix_sorts_18539 == 1 then
pUnit:RegisterEvent('spell1_18539', 1, 1)
end
if choix_sorts_18539 == 2 then
pUnit:RegisterEvent('spell2_18539', 1, 1)
end
if choix_sorts_18539 == 3 then
pUnit:RegisterEvent('spell3_18539', 1, 1)
end
end

function mob18539_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18539', math.random(1500, 3000), 1)
end

function mob18539_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18539_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18539_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18539, 1, 'mob18539_Action')
RegisterUnitEvent(18539, 2, 'mob18539_Leave')
RegisterUnitEvent(18539, 3, 'mob18539_Kill')
RegisterUnitEvent(18539, 4, 'mob18539_Die')
